Code coverage report for src/browser/logger.js

Statements: 42.11% (8 / 19)      Branches: 16.67% (1 / 6)      Functions: 33.33% (1 / 3)      Lines: 42.11% (8 / 19)      Ignored: none     

All files » src/browser/ » logger.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43      1 1 1     1 1 1     1                                                   1      
/* eslint-disable no-console */
require('console-polyfill');
var detection = require('./detection');
var _ = require('../utility');
 
function error() {
  var args = Array.prototype.slice.call(arguments, 0);
  args.unshift('Rollbar:');
  if (detection.ieVersion() <= 8) {
    console.error(_.formatArgsAsString(args));
  I} else {
    console.error.apply(console, args);
  }
}
 
function info() {
  var args = Array.prototype.slice.call(arguments, 0);
  args.unshift('Rollbar:');
  if (detection.ieVersion() <= 8) {
    console.info(_.formatArgsAsString(args));
  } else {
    console.info.apply(console, args);
  }
}
 
function log() {
  var args = Array.prototype.slice.call(arguments, 0);
  args.unshift('Rollbar:');
  if (detection.ieVersion() <= 8) {
    console.log(_.formatArgsAsString(args));
  } else {
    console.log.apply(console, args);
  }
}
 
/* eslint-enable no-console */
 
module.exports = {
  error: error,
  info: info,
  log: log
};